package com.example.druid.demo_druid.mapper;

import com.example.druid.demo_druid.model.Student;
import com.example.druid.demo_druid.util.MyMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author devsun
 * Created by on 2017/12/10.
 */
@Mapper
public interface StudentMapper extends MyMapper<Student>{

    @Select("SELECT * FROM student")
    List<Map<String,Object>> findStudentList();

    @Insert("INSERT INTO student (name,email,age,birthday) VALUES('121233','123@123.com',1,NOW())")
    Integer insertStudent();
}
